#!/bin/sh

rootdir=$PWD

LOCAL_LIB=""
APPID="socket_client"

for jar in `find ./lib -name "*.jar"`
do
      LOCAL_LIB="$LOCAL_LIB:""$jar"
done

JAVACLASSPATH=./conf/:.:$LOCAL_LIB

echo "local libs:$LOCAL_LIB"

MAIN_CLASS=com.lazy.netty.ex.bench.BenchClientMain

JAVA_OPTS="-Xms2048m -Xmx2048m -XX:PermSize=64M -XX:MaxPermSize=128M"
nohup java -server -DAPPID=$APPID  -DROOTDIR=$rootdir -classpath $JAVACLASSPATH $JAVA_OPTS $MAIN_CLASS >./log/result.log &

touch ${rootdir}/pid/pid
echo $! > ${rootdir}/pid/pid

echo "end !!!"
